﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Db.Models.Base;
using SqlSugar;

namespace TecentCOS
{
    public class Bll
    {
        public T FindUploadModel<T>(SimpleClient<T> db, string key) where T : UploadModelBase, new()
        {
            string keyName = key.Substring(key.LastIndexOf("/") + 1); //取实际的文件名

            var findOne = db.GetSingle(img => keyName == img.ImageName + "." + img.Extension);

            return findOne;

        }
    }
}